<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: kern/driver/clock.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b3dad8e81b3f37b89b2bf0a8abb2d993.html">kern</a></li><li class="navelem"><a class="el" href="dir_8a87c43ee200610f41c5389cbc1d45b8.html">driver</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<div class="title">clock.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="clock_8h_source.html">clock.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="defs_8h_source.html">defs.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="sbi_8h_source.html">sbi.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="stdio_8h_source.html">stdio.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="riscv_8h_source.html">riscv.h</a>&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
clock.c 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="clock_8c__incl.gif" border="0" usemap="#akern_2driver_2clock_8c" alt=""/></div>
<map name="akern_2driver_2clock_8c" id="akern_2driver_2clock_8c">
<area shape="rect" title=" " alt="" coords="105,5,246,32"/>
<area shape="rect" href="clock_8h.html" title=" " alt="" coords="5,80,73,107"/>
<area shape="rect" href="defs_8h.html" title=" " alt="" coords="108,155,171,181"/>
<area shape="rect" href="sbi_8h.html" title=" " alt="" coords="149,80,202,107"/>
<area shape="rect" href="stdio_8h.html" title=" " alt="" coords="226,80,293,107"/>
<area shape="rect" href="riscv_8h.html" title=" " alt="" coords="317,80,381,107"/>
<area shape="rect" href="stdarg_8h.html" title=" " alt="" coords="222,155,297,181"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a71e720e6a1768a304f7244166ec8e042"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="defs_8h.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clock_8c.html#a71e720e6a1768a304f7244166ec8e042">get_cycles</a> (void)</td></tr>
<tr class="separator:a71e720e6a1768a304f7244166ec8e042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78ab77b57cf2e00089f0a3a22508524c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clock_8c.html#a78ab77b57cf2e00089f0a3a22508524c">clock_init</a> (void)</td></tr>
<tr class="separator:a78ab77b57cf2e00089f0a3a22508524c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0064fb05d818581e3d12c5c017960715"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clock_8c.html#a0064fb05d818581e3d12c5c017960715">clock_set_next_event</a> (void)</td></tr>
<tr class="separator:a0064fb05d818581e3d12c5c017960715"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:a58c2ab0d14b56cc5d1a30ae1dd2f88a5"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="defs_8h.html#afeaa5ef46acd844422607ca6602691ef">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clock_8c.html#a58c2ab0d14b56cc5d1a30ae1dd2f88a5">ticks</a></td></tr>
<tr class="separator:a58c2ab0d14b56cc5d1a30ae1dd2f88a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa10c2d3db4e7a0d6124f98addce4e5ca"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="defs_8h.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clock_8c.html#aa10c2d3db4e7a0d6124f98addce4e5ca">timebase</a></td></tr>
<tr class="separator:aa10c2d3db4e7a0d6124f98addce4e5ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="a78ab77b57cf2e00089f0a3a22508524c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78ab77b57cf2e00089f0a3a22508524c">&#9670;&nbsp;</a></span>clock_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void clock_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="clock_8c_a78ab77b57cf2e00089f0a3a22508524c_cgraph.gif" border="0" usemap="#aclock_8c_a78ab77b57cf2e00089f0a3a22508524c_cgraph" alt=""/></div>
<map name="aclock_8c_a78ab77b57cf2e00089f0a3a22508524c_cgraph" id="aclock_8c_a78ab77b57cf2e00089f0a3a22508524c_cgraph">
<area shape="rect" title=" " alt="" coords="5,107,89,133"/>
<area shape="rect" href="clock_8c.html#a0064fb05d818581e3d12c5c017960715" title=" " alt="" coords="137,81,300,108"/>
<area shape="rect" href="stdio_8c.html#ab5c1b009763ca6674c08b6241dad015c" title=" " alt="" coords="187,132,251,159"/>
<area shape="rect" href="clock_8c.html#a71e720e6a1768a304f7244166ec8e042" title=" " alt="" coords="358,31,449,57"/>
<area shape="rect" href="sbi_8h.html#a07a40f8f344547fdc7396af43ea3f851" title=" " alt="" coords="348,81,459,108"/>
<area shape="rect" href="stdio_8c.html#a6d5854f463c39b8d25aaa127b216832e" title=" " alt="" coords="367,132,439,159"/>
<area shape="rect" href="stdio_8c.html#ae98dcd3b1f9718f15a600d22a69a2e9a" title=" " alt="" coords="515,56,581,83"/>
<area shape="rect" href="printfmt_8c.html#a6434f2b779b5ede2adc31ee4f7d64198" title=" " alt="" coords="507,157,589,184"/>
<area shape="rect" href="console_8c.html#a9a405546ecd1991ece1431da216e64f2" title=" " alt="" coords="637,5,724,32"/>
<area shape="rect" href="sbi_8h.html#a99638b95984187102dd50b1d0b430d3b" title=" " alt="" coords="772,5,927,32"/>
<area shape="rect" href="printfmt_8c.html#a7b1e12e09f757ca234758afb4d704db8" title=" " alt="" coords="651,56,711,83"/>
<area shape="rect" href="printfmt_8c.html#a934736e8473edc7ac3a20c613ae5f732" title=" " alt="" coords="647,107,715,133"/>
<area shape="rect" href="printfmt_8c.html#ad7d3bbf7612143a989ce3e9d1bfebf87" title=" " alt="" coords="643,157,718,184"/>
<area shape="rect" href="printfmt_8c.html#a51595febac146e7d189948ebb27e6768" title=" " alt="" coords="640,208,721,235"/>
<area shape="rect" href="string_8c.html#a732f92b81474cfb653776be70bc7f1c7" title=" " alt="" coords="647,259,714,285"/>
</map>
</div>

</div>
</div>
<a id="a0064fb05d818581e3d12c5c017960715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0064fb05d818581e3d12c5c017960715">&#9670;&nbsp;</a></span>clock_set_next_event()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void clock_set_next_event </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="clock_8c_a0064fb05d818581e3d12c5c017960715_cgraph.gif" border="0" usemap="#aclock_8c_a0064fb05d818581e3d12c5c017960715_cgraph" alt=""/></div>
<map name="aclock_8c_a0064fb05d818581e3d12c5c017960715_cgraph" id="aclock_8c_a0064fb05d818581e3d12c5c017960715_cgraph">
<area shape="rect" title=" " alt="" coords="5,31,168,57"/>
<area shape="rect" href="clock_8c.html#a71e720e6a1768a304f7244166ec8e042" title=" " alt="" coords="226,5,317,32"/>
<area shape="rect" href="sbi_8h.html#a07a40f8f344547fdc7396af43ea3f851" title=" " alt="" coords="216,56,327,83"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="clock_8c_a0064fb05d818581e3d12c5c017960715_icgraph.gif" border="0" usemap="#aclock_8c_a0064fb05d818581e3d12c5c017960715_icgraph" alt=""/></div>
<map name="aclock_8c_a0064fb05d818581e3d12c5c017960715_icgraph" id="aclock_8c_a0064fb05d818581e3d12c5c017960715_icgraph">
<area shape="rect" title=" " alt="" coords="284,31,447,57"/>
<area shape="rect" href="clock_8c.html#a78ab77b57cf2e00089f0a3a22508524c" title=" " alt="" coords="127,5,211,32"/>
<area shape="rect" href="trap_8c.html#ae7fe8b44139e05bbd2fdcdef5d616f3e" title=" " alt="" coords="101,56,236,83"/>
<area shape="rect" href="trap_8c.html#a372d166e36c086c91e5f5d81e5fead3a" title=" " alt="" coords="5,56,53,83"/>
</map>
</div>

</div>
</div>
<a id="a71e720e6a1768a304f7244166ec8e042"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71e720e6a1768a304f7244166ec8e042">&#9670;&nbsp;</a></span>get_cycles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="defs_8h.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> get_cycles </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="clock_8c_a71e720e6a1768a304f7244166ec8e042_icgraph.gif" border="0" usemap="#aclock_8c_a71e720e6a1768a304f7244166ec8e042_icgraph" alt=""/></div>
<map name="aclock_8c_a71e720e6a1768a304f7244166ec8e042_icgraph" id="aclock_8c_a71e720e6a1768a304f7244166ec8e042_icgraph">
<area shape="rect" title=" " alt="" coords="495,31,585,57"/>
<area shape="rect" href="clock_8c.html#a0064fb05d818581e3d12c5c017960715" title=" " alt="" coords="284,31,447,57"/>
<area shape="rect" href="clock_8c.html#a78ab77b57cf2e00089f0a3a22508524c" title=" " alt="" coords="127,5,211,32"/>
<area shape="rect" href="trap_8c.html#ae7fe8b44139e05bbd2fdcdef5d616f3e" title=" " alt="" coords="101,56,236,83"/>
<area shape="rect" href="trap_8c.html#a372d166e36c086c91e5f5d81e5fead3a" title=" " alt="" coords="5,56,53,83"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="a58c2ab0d14b56cc5d1a30ae1dd2f88a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58c2ab0d14b56cc5d1a30ae1dd2f88a5">&#9670;&nbsp;</a></span>ticks</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="defs_8h.html#afeaa5ef46acd844422607ca6602691ef">size_t</a> ticks</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa10c2d3db4e7a0d6124f98addce4e5ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa10c2d3db4e7a0d6124f98addce4e5ca">&#9670;&nbsp;</a></span>timebase</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="defs_8h.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> timebase</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
